home *** CD-ROM | disk | FTP | other *** search
- Path: engnews1.Eng.Sun.COM!taumet!clamage
- From: fjh@munta.cs.mu.OZ.AU (Fergus Henderson)
- Newsgroups: comp.std.c++
- Subject: Re: ambiguous typedef
- Date: 29 Jan 1996 16:05:55 GMT
- Organization: Computer Science, University of Melbourne, Australia
- Sender: news@cs.mu.OZ.AU (CS-Usenet)
- Approved: clamage@eng.sun.com (comp.std.c++)
- Message-ID: <9602921.25314@mulga.cs.mu.OZ.AU>
- References: <199601290522.OAA29067@k4.k2.t.u-tokyo.ac.jp>
- NNTP-Posting-Host: 129.146.88.126
- Originator: clamage@taumet
-
- TABATA Tomohira <loba@k2.t.u-tokyo.ac.jp> writes:
-
- >Can't I use this declaration successfully?
-
- > class T1 {
- > public:
- > typedef T1 myclass;
- > };
-
- > class T2 {
- > public:
- > typedef T2 myclass;
- > };
-
- > class T3 : public T1, T2 {
- > public:
- > typedef T3 myclass;
- > };
-
- That code is strictly conforming (i.e. perfectly legal).
-
- >By gcc-2.7.1 this cannot be compiled because of "request for member
- >`myclass' is ambiguous" on the line "typedef T3 myclass;".
-
- This is a bug in gcc.
-
- --
- Fergus Henderson WWW: http://www.cs.mu.oz.au/~fjh
- fjh@cs.mu.oz.au PGP: finger fjh@128.250.37.3
-
- [ comp.std.c++ is moderated. Submission address: std-c++@ncar.ucar.edu.
- Contact address: std-c++-request@ncar.ucar.edu. The moderation policy
- is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
-
-